Login to TechLifeForum X
Board Index Go to Reboot.Pro
  • Account Login
  • Register
TechLifeForum
  • Home
  • Members
  • Awards
  • Rules
  • Help
  • Donate
  • Live IRC
TechLifeForum / Portal[Advanced Search]

Welcome, Guest

You have to register before you can post on our site.

Username/Email:
  

Password
  





Search Forums


(Advanced Search)

Forum Statistics

» Members: 3,141
» Latest member: purplemen
» Forum threads: 3,757
» Forum posts: 30,940

Full Statistics

Online Users

There are currently 24 online users.
» 1 Member(s) | 23 Guest(s)
purplemen

Latest Activity

Parse By Class
Last Post: KoBE
Today 06:57 PM
» Replies: 2
» Views: 19
Datagridview not saving
Last Post: KoBE
Today 02:22 PM
» Replies: 3
» Views: 84
[C#][VB.NET]LimitlessThem...
Last Post: KoBE
Today 02:04 PM
» Replies: 6
» Views: 121
DotNet Patcher (Merger, P...
Last Post: AceInfinity
Yesterday 11:03 PM
» Replies: 10
» Views: 310
Lose Quality ?
Last Post: AceInfinity
Yesterday 10:53 PM
» Replies: 3
» Views: 105
[C#-ASP.NET] SQL Database...
Last Post: KoBE
Yesterday 02:27 PM
» Replies: 3
» Views: 73
httpwebrequest get user i...
Last Post: KoBE
06-17-2013 11:00 PM
» Replies: 4
» Views: 145
use with drawimage
Last Post: 1912Dummy
06-15-2013 01:29 PM
» Replies: 9
» Views: 275
PassPass - Bypass the Pas...
Last Post: Holmes.Sherlock
06-15-2013 08:53 AM
» Replies: 3
» Views: 128
Maluuba - Windows Phone 8
Last Post: AceInfinity
06-13-2013 10:53 PM
» Replies: 7
» Views: 232

Parse By Class

Posted by: simx - Today 03:41 PM - Replies (2)

Hey up there everyone!

I have seen a few different functions such as "ParseBetween" and "ParseBetweenAll"butI was wondering if there is such a function that you may know of so I could parse HTML code, such as:

Code: (SELECT ALL CODE)
div>
            <span> <!-- start: forumdisplay_thread_gotounread -->
<a href="showthread.php?tid=4097&amp;action=newpost"><img src="themes/TLF/jump.gif" alt="Go to first unread post" title="Go to first unread post" /></a>
<!-- end: forumdisplay_thread_gotounread --><a href="showthread.php?tid=4097" class=" subject_new" id="tid_4097">Datagridview not saving</a></span>
            <div class="author smalltext">Started by <a href="http://tech.reboot.pro/member.php?action=profile&amp;uid=1562">t0kneneng</a></div>
        </div>
Like if I wanted to return "Datagridview not saving" from the class " subject_new".

Any ideas guys?

Thanks in advance.

SimX
(Show More)

Print this item Send this item to a friend

Datagridview not saving

Posted by: t0kneneng - Yesterday 08:57 PM - Replies (3)

Hi! I have an issue regarding datagridview I have insert 5 items then whenever i save the record only 4 items is save. I observe that if I don't tab the last item it will not save. How to save all items without tab or go to new line?

Print this item Send this item to a friend

[C#-ASP.NET] SQL Database connection !

Posted by: Omegastarscream15 - Yesterday 03:01 AM - Replies (3)

Hello, this is my first asp.net web appplication , I'am trying to insert something to the database but it dosen't work and the label keep giving me error on catch ex . help please , here is my code[/size]


Code: (SELECT ALL CODE)
Try {
                   SqlConnection sqlConnection = new SqlConnection("Data Source=" + ConfigurationManager.AppSettings["IP"] + ";Initial Catalog=" + ConfigurationManager.AppSettings["DB_Name"] + ";User Id=" + ConfigurationManager.AppSettings["SQLUser"] + ";Password=" + ConfigurationManager.AppSettings["SQLPassword"] + "; MultipleActiveResultSets = True;");
                                                    SqlCommand sqlcmd = new SqlCommand();
                                                    sqlcmd.Connection = sqlConnection;

                                                    SqlCommand insertCommand2 = new SqlCommand("INSERT [dbo].[Accounts] ([account_id], [login_name], [password], [block], [withdraw_remain_time], [age], [auth_ok], [pcbang], [last_login_server_idx], [event_code], [server_list_mask], [result], [ip], [game_code], [gamecode], [email], [e-mail], [beta], [Raison Ban]) VALUES (1276699, 'DexterFire1', 'f5d7268f45028ca83ea1d51e8d6c61f4', 0, 0, 18, 1, 1, 1, 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, 0, NULL)", sqlConnection);
                                                    sqlConnection.Open();
                                                    insertCommand2.ExecuteNonQuery();
                                                    sqlConnection.Close();
                                                   Label1.Text = "You successed to make the account ";
                                    
                                                }
                                                catch (Exception ex)
                                                {
                                                    Label1.Text = "*Error while making the account ";
                                                }
(Show More)

Print this item Send this item to a friend

[C#][VB.NET]LimitlessTheme

Posted by: Xenocode - 06-17-2013 04:07 PM - Replies (6)

Pending further review by KoBE

Print this item Send this item to a friend

Lose Quality ?

Posted by: 1912Dummy - 06-17-2013 02:32 AM - Replies (3)

Hello,

i was wondering if there was a way to keep the quality of the image when you use a angle?

Code: (SELECT ALL CODE)
m_angle = 6
gr.RotateTransform(-m_angle)
gr.DrawImage(Image.Image, 13, 56, 107, 100)
gr.SmoothingMode = SmoothingMode.AntiAlias

i even tried every option from smoothingmode but nothing seems to work
i can't keep the nice clean quality of the image has a transparency background like a png or gif file.

does anyone know the solution?

thanks
(Show More)

Print this item Send this item to a friend

httpwebrequest get user info

Posted by: GameX99987 - 06-16-2013 06:51 PM - Replies (4)

I wonder if it is possible to grap info (such as post count, etc.) from a user that login using httpwebrequest? If so, how? The website I wan't to grab user info from is an IPB board.

Print this item Send this item to a friend

use with drawimage

Posted by: 1912Dummy - 06-12-2013 10:13 AM - Replies (9)

Hello,

i was wondering if this was possible
i can't find any solution on the web.

i use:
Code: (SELECT ALL CODE)
Dim mymenu As New ContextMenuStrip

        gr.DrawImage(PictureBox3.Image, 11, 54, 110, 104)
        
        mymenu.BackColor = Color.Coral
        mymenu.Items.Add("Testing 123")
        mymenu.Items.Add("Testing 456")
        mymenu.Items.Add("Testing 789")
        Me.ContextMenuStrip = mymenu

seems this wont show.
and i want to add a contextmenu on it
so when i press right mouse i get a menu

any one?
thanks :)
(Show More)

Print this item Send this item to a friend

Report Viewer

Posted by: t0kneneng - 06-11-2013 10:54 PM - Replies (4)

Hi guys I'm about to create report in vb.net but I couldn't good example in previous vb6 i can create unbound data report now and vb.net it's hard to find a good sample unbound report viewer. It is possible to control data pass using SQL script with parameters date or filter by certain field. How to pass value from data reader to textbox or table. I'm currently using MySQL database.

Before in vb6 this how code.

Code: (SELECT ALL CODE)
Set DB = OpenDatabase(sDBPath)
    
    sSQL = "SELECT p_Name, p_Age, p_Salary, p_Input_Date FROM Personnel"
    
    Set RS = DB.OpenRecordset(sSQL)

    Set DataReport1.DataSource = RS

    DataReport1.Sections("SectionMain").Controls("txtName").DataField = RS!p_Name

    RS.Close
    Set DB = Nothing

    DataReport1.Show

By the way which is better to used report viewer or crystal report? I haven't used crystal report since vb6 I always used data report before.
(Show More)

Print this item Send this item to a friend

Print directly to printer on LX 300 dot matrix

Posted by: t0kneneng - 06-11-2013 05:17 AM - Replies (9)

Hi everyone I found some code while google to print on default printer it's working fine except it's not behave what i would like to do sending data to printer. Below is the class code for printer.

Code: (SELECT ALL CODE)
Imports System.Runtime.InteropServices

Public Class Rawprinter
    ' ----- Define the data type that supplies basic
    ' print job information to the spooler.
    <StructLayout(LayoutKind.Sequential, _
    CharSet:=CharSet.Unicode)> _
    Public Structure DOCINFO
        <MarshalAs(UnmanagedType.LPWStr)> _
        Public pDocName As String
        <MarshalAs(UnmanagedType.LPWStr)> _
        Public pOutputFile As String
        <MarshalAs(UnmanagedType.LPWStr)> _
        Public pDataType As String
    End Structure
    ' ----- Define interfaces to the functions supplied
    ' in the DLL.
    <DllImport("winspool.drv", EntryPoint:="OpenPrinterW", _
    SetLastError:=True, CharSet:=CharSet.Unicode, _
    ExactSpelling:=True, _
    CallingConvention:=CallingConvention.StdCall)> _
    Public Shared Function OpenPrinter( _
ByVal printerName As String, ByRef hPrinter As IntPtr, _
ByVal printerDefaults As Integer) As Boolean
    End Function
    <DllImport("winspool.drv", EntryPoint:="ClosePrinter", _
    SetLastError:=True, CharSet:=CharSet.Unicode, _
    ExactSpelling:=True, _
    CallingConvention:=CallingConvention.StdCall)> _
    Public Shared Function ClosePrinter( _
ByVal hPrinter As IntPtr) As Boolean
    End Function
    <DllImport("winspool.drv", EntryPoint:="StartDocPrinterW", _
    SetLastError:=True, CharSet:=CharSet.Unicode, _
    ExactSpelling:=True, _
    CallingConvention:=CallingConvention.StdCall)> _
    Public Shared Function StartDocPrinter( _
ByVal hPrinter As IntPtr, ByVal level As Integer, _
ByRef documentInfo As DOCINFO) As Boolean
    End Function
    <DllImport("winspool.drv", EntryPoint:="EndDocPrinter", _
    SetLastError:=True, CharSet:=CharSet.Unicode, _
    ExactSpelling:=True, _
    CallingConvention:=CallingConvention.StdCall)> _
    Public Shared Function EndDocPrinter( _
ByVal hPrinter As IntPtr) As Boolean
    End Function
    <DllImport("winspool.drv", EntryPoint:="StartPagePrinter", _
    SetLastError:=True, CharSet:=CharSet.Unicode, _
    ExactSpelling:=True, _
    CallingConvention:=CallingConvention.StdCall)> _
    Public Shared Function StartPagePrinter( _
ByVal hPrinter As IntPtr) As Boolean
    End Function
    <DllImport("winspool.drv", EntryPoint:="EndPagePrinter", _
    SetLastError:=True, CharSet:=CharSet.Unicode, _
    ExactSpelling:=True, _
    CallingConvention:=CallingConvention.StdCall)> _
    Public Shared Function EndPagePrinter( _
ByVal hPrinter As IntPtr) As Boolean
    End Function
    <DllImport("winspool.drv", EntryPoint:="WritePrinter", _
    SetLastError:=True, CharSet:=CharSet.Unicode, _
    ExactSpelling:=True, _
    CallingConvention:=CallingConvention.StdCall)> _
    Public Shared Function WritePrinter( _
ByVal hPrinter As IntPtr, ByVal buffer As IntPtr, _
ByVal bufferLength As Integer, _
ByRef bytesWritten As Integer) As Boolean
    End Function
    Public Shared Sub PrintRaw( _
    ByVal printerName As String, _
    ByVal origString As String)
        ' ----- Send a string of raw data to the printer.
        Dim hPrinter As IntPtr
        Dim spoolData As New DOCINFO
        Dim dataToSend As IntPtr
        Dim dataSize As Integer
        Dim bytesWritten As Integer
        ' ----- The internal format of a .NET String is just
        ' different enough from what the printer expects
        ' that there will be a problem if we send it
        ' directly. Convert it to ANSI format before
        ' sending.
        dataSize = origString.Length()
        dataToSend = Marshal.StringToCoTaskMemAnsi(origString)
        ' ----- Prepare information for the spooler.
        spoolData.pDocName = "Print Document"
        spoolData.pDataType = "RAW"
        Try
            ' ----- Open a channel to the printer or spooler.
            Call OpenPrinter(printerName, hPrinter, 0)
            ' ----- Start a new document and Section 1.1.
            Call StartDocPrinter(hPrinter, 1, spoolData)
            Call StartPagePrinter(hPrinter)
            ' ----- Send the data to the printer.
            Call WritePrinter(hPrinter, dataToSend, _
            dataSize, bytesWritten)
            ' ----- Close everything that we opened.
            EndPagePrinter(hPrinter)
            EndDocPrinter(hPrinter)
            ClosePrinter(hPrinter)
        Catch ex As Exception
            MsgBox("Error occurred: " & ex.ToString)
        Finally
            ' ----- Get rid of the special ANSI version.
            Marshal.FreeCoTaskMem(dataToSend)
        End Try
    End Sub
End Class

Now my code to print.

Code: (SELECT ALL CODE)
Private Function __getDefaultPrinterName() As String
        Try
            Dim __pname As String = String.Empty
            Dim _printDialog As New System.Windows.Forms.PrintDialog
            __pname = _printDialog.PrinterSettings.PrinterName '= "set as Default printer"
            Return __pname
        Catch ex As Exception
            Return String.Empty
            ' System.Windows.Forms.MessageBox.Show("could not printed Label.", "Print Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
    End Function

    Private Sub PrintItems()
        For Each lvItem As ListViewItem In lv_list.Items
            Rawprinter.PrintRaw(__getDefaultPrinterName, lvItem.SubItems(0).Text & " ----------- " & lvItem.SubItems(1).Text)
        Next
    End Sub

It print only 1 line then next item will be printed on the next page. How to print all items in one page?
(Show More)

Print this item Send this item to a friend

Apple IOS 7?

Posted by: AceInfinity - 06-10-2013 04:57 PM - Replies (8)

Okay, so I seen news about IOS 7 today... What the heck is up with that? It looks like they copied the simplistic look that Microsoft adopted for Windows 8...





Apple copying Microsoft now? Unsure I must say that this is the lamest point in history for innovative designs. Is there no creativity anymore?
(Show More)

Print this item Send this item to a friend

Youtube Facebook Twitter Digg
Return to Top
All content © copyright TechLifeForum
Powered By MyBB, © 2002-2013 MyBB Group
Designed by ThemeFreak
Mobile Version