Search Results

Search found 21802 results on 873 pages for 'erx vb next coder'.

Page 11/873 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • When overriding initWithCoder is it always necessary to call [super initWithCoder: coder]

    - by Evan
    In this code I am loading a View Controller (and associated View) from a .xib: -(id)initWithCoder:(NSCoder *)coder { [super initWithCoder:coder]; return self; } This successfully works, but I do not really understand what the line [super initWithCoder:coder] is accomplishing. Is that initializing my View Controller after my View has been initialized? Please be as explicit as possible when explaining. Thanks.

    Read the article

  • multi-threaded proxy checker having problems

    - by Paul
    hello everyone, I am trying to create a proxy checker. This is my first attempt at multithreading and it's not going so well, the threads seem to be waiting for one to complete before initializing the next. Imports System.Net Imports System.IO Imports System.Threading Public Class Form1 Public sFileName As String Public srFileReader As System.IO.StreamReader Public sInputLine As String Public Class WebCall Public proxy As String Public htmlout As String Public Sub New(ByVal proxy As String) Me.proxy = proxy End Sub Public Event ThreadComplete(ByVal htmlout As String) Public Sub send() Dim myWebRequest As HttpWebRequest = CType(WebRequest.Create("http://www.myserver.com/ip.php"), HttpWebRequest) myWebRequest.Proxy = New WebProxy(proxy, False) Try Dim myWebResponse As HttpWebResponse = CType(myWebRequest.GetResponse(), HttpWebResponse) Dim loResponseStream As StreamReader = New StreamReader(myWebResponse.GetResponseStream()) htmlout = loResponseStream.ReadToEnd() Debug.WriteLine("Finished - " & htmlout) RaiseEvent ThreadComplete(htmlout) Catch ex As WebException If (ex.Status = WebExceptionStatus.ConnectFailure) Then End If Debug.WriteLine("Failed - " & proxy) End Try End Sub End Class Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim proxy As String Dim webArray As New ArrayList() Dim n As Integer For n = 0 To 2 proxy = srFileReader.ReadLine() webArray.Add(New WebCall(proxy)) Next Dim w As WebCall For Each w In webArray Threading.ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf w.send), w) Next w End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load srFileReader = System.IO.File.OpenText("proxies.txt") End Sub End Class

    Read the article

  • How to find which delimiter was used during string split (VB.NET)

    - by typoknig
    Hi all, lets say I have a string that I want to split based on several characters, like ".", "!", and "?". How do I figure out which one of those characters split my string so I can add that same character back on to the end of the split segments in question? Dim linePunctuation as Integer = 0 Dim myString As String = "some text. with punctuation! in it?" For i = 1 To Len(myString) If Mid$(entireFile, i, 1) = "." Then linePunctuation += 1 Next For i = 1 To Len(myString) If Mid$(entireFile, i, 1) = "!" Then linePunctuation += 1 Next For i = 1 To Len(myString) If Mid$(entireFile, i, 1) = "?" Then linePunctuation += 1 Next Dim delimiters(3) As Char delimiters(0) = "." delimiters(1) = "!" delimiters(2) = "?" currentLineSplit = myString.Split(delimiters) Dim sentenceArray(linePunctuation) As String Dim count As Integer = 0 While linePunctuation > 0 sentenceArray(count) = currentLineSplit(count)'Here I want to add what ever delimiter was used to make the split back onto the string before it is stored in the array.' count += 1 linePunctuation -= 1 End While

    Read the article

  • c++ to vb.net , problem with callback function

    - by johan
    I'm having a hard time here trying to find a solution for my problem. I'm trying to convert a client API funktion from C++ to VB.NET, and i think have some problems with the callback function. parts of the C++ code: typedef struct{ BYTE m_bRemoteChannel; BYTE m_bSendMode; BYTE m_nImgFormat; // =0 cif ; = 1 qcif char *m_sIPAddress; char *m_sUserName; char *m_sUserPassword; BOOL m_bUserCheck; HWND m_hShowVideo; }CLIENT_VIDEOINFO, *PCLIENT_VIDEOINFO; CPLAYER_API LONG __stdcall MP4_ClientStart(PCLIENT_VIDEOINFO pClientinfo,void(CALLBACK *ReadDataCallBack)(DWORD nPort,UCHAR *pPacketBuffer,DWORD nPacketSize)); void CALLBACK ReadDataCallBack(DWORD nPort,UCHAR *pPacketBuffer,DWORD nPacketSize) { TRACE("%d\n",nPacketSize); } ..... aa5.m_sUserName = "123"; aa5.m_sUserPassword="w"; aa5.m_bUserCheck = TRUE; MP4_ClientSetTTL(64); nn1 = MP4_ClientStart(&aa5,ReadDataCallBack); if (nn1 == -1) { MessageBox("error"); return; } SDK description: MP4_ClientStart This function starts a connection. The format of the call is: LONG __stdcall MP4_ClientStart(PCLIENT_VIDEOINFO pClientinfo, void(*ReadDataCallBack)(DWORD nChannel,UCHAR *pPacketBuffer,DWORD nPacketSize)) Parameters pClientinfo holds the information. of this connection. nChannel holds the channel of card. pPacketBuffer holds the pointer to the receive buffer. nPacketSize holds the length of the receive buffer. Return Values If the function succeeds the return value is the context of this connection. If the function fails the return value is -1. Remarks typedef struct{ BYTE m_bRemoteChannel; BYTE m_bSendMode; BYTE m_bImgFormat; char *m_sIPAddress; char *m_sUserName; char *m_sUserPassword; BOOL m_bUserCheck; HWND m_hShowVideo; } CLIENT_VIDEOINFO, * PCLIENT_VIDEOINFO; m_bRemoteChannel holds the channel which the client wants to connect to. m_bSendMode holds the network mode of the connection. m_bImgFormat : Image format, 0 is main channel video, 1 is sub channel video m_sIPAddress holds the IP address of the server. m_sUserName holds the user’s name. m_sUserPassword holds the user’s password. m_bUserCheck holds the value whether sends the user’s name and password or not. m_hShowVideo holds Handle for this video window. If m_hShowVideo holds NULL, the client can be record only without decoder. If m_bUserCheck is FALSE, we will send m_sUserName and m_sUserPassword as NULL, else we will send each 50 bytes. The length of m_sIPAddress and m_sUserName must be more than 50 bytes. ReadDataCallBack: When the library receives a packet from a server, this callback is called. My VB.Net code: Imports System.Runtime.InteropServices Public Class Form1 Const WM_USER = &H400 Public Structure CLIENT_VIDEOINFO Public m_bRemoteChannel As Byte Public m_bSendMode As Byte Public m_bImgFormat As Byte Public m_sIPAddress As String Public m_sUserName As String Public m_sUserPassword As String Public m_bUserCheck As Boolean Public m_hShowVideo As Long 'hWnd End Structure Public Declare Function MP4_ClientSetNetPort Lib "hikclient.dll" (ByVal dServerPort As Integer, ByVal dClientPort As Integer) As Boolean Public Declare Function MP4_ClientStartup Lib "hikclient.dll" (ByVal nMessage As UInteger, ByVal hWnd As System.IntPtr) As Boolean <DllImport("hikclient.dll")> Public Shared Function MP4_ClientStart(ByVal Clientinfo As CLIENT_VIDEOINFO, ByRef ReadDataCallBack As CALLBACKdel) As Long End Function Public Delegate Sub CALLBACKdel(ByVal nPort As Long, <MarshalAs(UnmanagedType.LPArray)> ByRef pPacketBuffer As Byte(), ByVal nPacketSize As Long) Public Sub CALLBACK(ByVal nPort As Long, <MarshalAs(UnmanagedType.LPArray)> ByRef pPacketBuffer As Byte(), ByVal nPacketSize As Long) End Sub Public mydel As New CALLBACKdel(AddressOf CALLBACK) Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Clientinfo As New CLIENT_VIDEOINFO() Clientinfo.m_bRemoteChannel = 0 Clientinfo.m_bSendMode = 0 Clientinfo.m_bImgFormat = 0 Clientinfo.m_sIPAddress = "193.168.1.100" Clientinfo.m_sUserName = "1" Clientinfo.m_sUserPassword = "a" Clientinfo.m_bUserCheck = False Clientinfo.m_hShowVideo = Me.Handle 'Nothing MP4_ClientSetNetPort(850, 850) MP4_ClientStartup(WM_USER + 1, Me.Handle) MP4_ClientStart(Clientinfo, mydel) End Sub End Class here is some other examples of the code in: C# http://blog.csdn.net/nenith1981/archive/2007/09/17/1787692.aspx VB ://read.pudn.com/downloads70/sourcecode/graph/250633/MD%E5%AE%A2%E6%88%B7%E7%AB%AF%28VB%29/hikclient.bas__.htm ://read.pudn.com/downloads70/sourcecode/graph/250633/MD%E5%AE%A2%E6%88%B7%E7%AB%AF%28VB%29/Form1.frm__.htm Delphi ://read.pudn.com/downloads91/sourcecode/multimedia/streaming/349759/Delphi_client/Unit1.pas__.htm

    Read the article

  • vb.net ampersand vs plus for concatenating string

    - by dcp
    In VB.Net, is there any advantage to using & to concatenate strings instead of +? e.g. Dim x as String = "hello" + " there" vs. Dim x as String = "hello" & " there" Yes, I know for a lot of string concatenations I'd want to use StringBuilder, but this is more of a general question.

    Read the article

  • nservicebus compiler error "reference required to assembly nServicebus" in vb.net programs

    - by mgcain
    I downloaded the nServicebus binaries as of May 17th and have two different vb.net projects (one in .net 3.5, the other in .net 4.0) that both have the error "Reference to Assembly nServicebus, Version 2.0.0.1145, culture=neutral, PublicKeyToken=9fc386479f8a226c containing the type NServicebus.IStartable. Add one to your project. I have in the references already nServicebus.dll, nservicebus.Core.dll, and log4net.dll

    Read the article

  • return distinct records using subsonic 3 query and VB

    - by HR
    I have been having issues trying to return distinct records from a subsonic3 query using VB. My base query looks like so: Dim q As New [Select]("Region") q.From("StoreLocation") q.Where("State").IsEqualTo(ddlState.SelectedValue) q.OrderAsc("Region") This returns duplicates. How can I add a distinct clause in this to return distinct records? I have been trying to place around with Contraints, but to no avail. Thanks in advance HR

    Read the article

  • creating a radiobutton control in vb.net

    - by reffer
    ok this is my code in vb.net behind where i am creating the radiobutton - TD = New HtmlTableCell Dim rdb As New RadioButton() rdb.ID = "rdb_ads_" & DR("ID") TD.Controls.Add(rdb) TR.Cells.Add(TD) It displays the radiobutton, but doesnt select single. i can select all at one time. how do i make it to select only 1 at a time. i know its basic for u guys, but will help me a lot

    Read the article

  • FormCollection in VB.NET

    - by fireBand
    Hi, I want to detect if a window form is open and if it is then I would like to bring it in front rather than opening it again. I know I need a form collection for this but I want to know if there is a built in form collection that holds all the forms in VB.NET or I need to implement my own. Thank you.

    Read the article

  • Run time error in vb.net

    - by Muhammed Yoosuf
    I get the following error message in vb.net when I try to run the program Any help is greatly appreciated. Thanks Error 1 Unable to copy file "C:\Users\Mr. M Yoosuf Hassan\Desktop\CD\Software (full version)\Airline Reservation System - Copy\Airline Reservation System\Airline2.mdb" to "bin\Debug\Airline2.mdb". Could not find file 'C:\Users\Mr. M Yoosuf Hassan\Desktop\CD\Software (full version)\Airline Reservation System - Copy\Airline Reservation System\Airline2.mdb'. Airline Reservation System

    Read the article

  • VB.Net IO performance

    - by CFP
    Having read this page, I can't believe that VB.Net has such a terrible performance when it comes to I/O. Is this still true today? How does the .Net Framework 2.0 perform in terms of I/O (taht's the version I'm targeting)?

    Read the article

  • VB.NET: how to require CheckedListBox to have at least one item selected in WinForms

    - by Craig Johnston
    With the CheckListBox in VB.NET in VS2005, how would you make it compulsory that at least one item is selected? Can you select one of the items at design time to make it the default? EDIT: How can I make it so the last item the user tries to uncheck is the one that stays checked? So it's like the user tries to uncheck the only checked item but can't because it checks back straightaway.

    Read the article

  • Oracle datetime in VB.net

    - by acadia
    I have a Oracle procedure to which I have to pass a datetime value (2/5/2010 11:46 AM) How do I pass this value from VB.net. When I pass the date as shown below it is not returning any records though there are records. With Cmd .Connection = FactsConn .CommandType = CommandType.StoredProcedure .CommandText = "sp_atas_image_qry" .Parameters.Add(New OracleParameter("vinspectiondatetime", OracleClient.OracleType.DateTime)).Value = "2/5/2010 11:46 AM" .Parameters.Add(New OracleParameter("io_cursor", OracleClient.OracleType.Cursor)).Direction = ParameterDirection.Output End With

    Read the article

  • Windows Media Player Device Sync in VB.NET using WMPLIB

    - by Jack Hayter
    The MSDN documentation for WMPLIB states that syncing to device is not supported in .NET programming, only C++. Is there, however, a simple wrapper class or DLL that can be used to interface between a .NET program and the nescessary C++ code? Or is there a better way to sync files to a device using VB.NET? Are all devices suited/compatible with just a simple filesystem.copyfile ?

    Read the article

  • Should I use Call keyword in VB/VBA?

    - by Fred Loyant
    I use the Call keyword used when calling subs in VB/VBA. I know it's optional, but is it better to use it or leave it off? I've always thought it was more explicit, but maybe it's just noise. Also, I read this on another forum: Using the Call keyword is faster because it knows that it is not going to return any values, so it doesn't need to set up any stackspace to make room for the return value.

    Read the article

  • VB.NET - Send [Delegate] through the classes to set AddressOf

    - by sv88erik
    How can I put AddressOf, from another class? I get this error 'AddressOf' operand must be the name of a method (without parentheses). " Is there an Eval () function in VB.NET? Or how does one do this? Public Shared Property e As UserControl Public Shared Sub SetButton(ByVal button As String, ByVal Objekt As [Delegate]) Dim errorbuttom1 As Button = e.FindName("errorButton1") AddHandler errorbuttom1.Click, AddressOf Objekt End Sub

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >