Can't Get A Handle On The Syntax?
Aug 6, 2009I can't get a handle on the syntax. Can anyone give me a simple demo?
View 3 RepliesI can't get a handle on the syntax. Can anyone give me a simple demo?
View 3 RepliesI am having an issue trying to figure this out. I am writing a script editor that uses tabs (a tab control) and I want to implement syntax highlighting. My issue is that every sample I can find on syntax highlighting uses
Private Sub RichTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
I wrote an application to handle a joystick with directinput. It works fine if it uses the handle of the main window but it doesnt happen the same if the handle is the one of the component that contains the joystick's operation.
I mean:
main form handle: 15
component handle (which is inside the window and the joystick needs the focus of this component to work): 25
It always work if the handle i initilizate the device is the main form (15).How can i use only the handle of the component?
Can any one translate the following syntax to vb.net.
m_TextBox.Loaded += TextBoxLoaded
m_TextBox.Loaded -= TextBoxLoaded;
private void TextBoxLoaded(object sender, RoutedEventArgs e)[code].....
i have this code:Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[Code]...
Error 1: Option Strict On disallows late binding.Im using visual basic 2010 express on a gateway laptop thats running Windows 7 OS How do i resolve this error?
I have a listbox and it it I am showing numbers.It should look like this (line by line) 1,2,3,4,5,6,7,8,9,10,11.....but is is showing it like this 1,10,11,...2,20,21...3,30...ow can I make it that it will show it in number order 1,2,3,4,5......
View 5 RepliesI want to select some rows from a sql express 2005 table. I am using this expression: "Starttime >= " & dtpStart.Value dtpStart is a DateTimePicker But I am getting this error: Syntax error: Missing operand after '14' operator.
View 18 RepliesPossible Duplicate: Can .NET intercept and change css files?
I have configured IIS6 to get .NET to handle css files.I did the following steps
Launch IIS Manager Right-click on Default Web Site Click on the Home Directory tab Under Application Settings click on Configuration.Add a new association for .css and map it to .NET executable:
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727aspnet_isapi.dll
How can I check if this is working, i.e. I want to change the default style of a page depending on the url, i.e. if the referer url is http://intranet, it should continue to use the old existing style style1.css, if the referer url is http://intranetv2, it should use the new style style2.css.
I am trying to get a handle on the correct way and easiest way to do things. By easiest I am not talking about being lazy just accessing and modifying later on. I have started using my own classes and such but I have a few questions. Sometimes I want to create a control on the fly through code instead of using the designer. Should I create this control in the main form file or in a separate class? If I make it in another class it seems harder to access later on. Then again if I dont know that the control is going to be created(user clicks a button to add a control) how can I access it? Also it seems alot harder to access certain things when it is in another class. For example if I create a new window in a class and then want to check if it is there or not it is alot harder to do.
View 5 RepliesAre there anyone know how to get the handle of a standard Combobox using API?
View 3 RepliesHow do i get the handle of a NotifyIcon?
View 4 RepliesI need the intPtr for a form. Control.FromHandle(control) gives me the control from a handle, but I need the opposite--get the handle from a control. How do I do this?
View 2 RepliesI need to get the handle of a control as an IntPtr to pass to a screen capture class in vb.Net 3.0. Tried this but get an invalid handle exception.
Dim hwnd As IntPtr = Runtime.InteropServices.GCHandle.Alloc(CanvasMap)
I am trying to create a small utility that tracks desktop usage in detail, to the level of individual text boxes etc.... in other applications. However, it is proving quite tricky. I thought I had it nailed using the Windows api. The below code is just a snipet of the code but essentially it provides me the handle of the control that the mouse is over. I thought from here, it would be easy to to the same thing but to provide the handle of the control that the cursor was actually clicked on, for example, if someone is filling in a text box in an application, they would not necessarily move the mouse to get to the text box, they may tab to it. Does anyone know if there is a way to get the handle of the control that is in use?
Private Sub Timer1_Tick(sender As Object, e As System.EventArgs) Handles Timer1.Tick
Dim ptx As Integer = Cursor.Position.X
Dim pty As Integer = Cursor.Position.Y
[code]....
I need to get the handle of a window with a specific name from my vb.net application. The form isn't actually from my application.
View 1 RepliesI am going mad about getting the process id for one existing handle on VB2008.I tried both GetWindowThreadProcessId(hwnd, pid) and GetProcessId(hwnd), while PID always returns 0, I tried the same things in VBA of Excel, it works perfect, so this is somewhat weird,
View 8 RepliesI have referred DLL in my project. I have to handle the event from DLL in VB.net code. I guess we can do using WithEvents. Can you give me complete picture?
View 2 RepliesI am having a SP run in my VB application every 10 seconds to check for any new rows that have been inserted to the database since the last check. What is the best way to do this? Most likely it will be 0 or 1 rows, but I am afraid at random times it maybe more than 1 and so I thought I would fill it in a DataSet, but I came in here to see if there are any other better ways. If dataset is the best way, how do I do a For Each Row in the dataset to process some VB code for each row?
View 20 RepliesI read stuff from a SQL DB (database) using a data set. Some of the columns in the DB may contain NULL. I want to go through the table in the dataset and print, or use in some other way, the data. But when I try to use a certain data that corresponds to a NULL in the DB my program crashes.How can I detect - in the dataset - that it has no value and that I shouldn't try to use it?
Private Sub Get�rendenLista(ByVal e As System.EventArgs)
'----------------------------------------------------------------------
' This function fetches a list of �rende from the table �rende
'----------------------------------------------------------------------
Dim cno As New SqlConnection
[code]....
The short program below runs just fine when it is the only item on a form. However, when I put it into the ItemInsertTemplate of a ListView control, I get the following message:
Handles clause requires a WithEvents variable defined in the containing type or one of its base types
Line 30: Protected Sub btnDate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDate.Click
The error message identifies Line 30 as the problem.I get the same message for Sub clnEvent_SelectionChanged How do I correct this?
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="clnControl.aspx.vb" Inherits="clnControl" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
[code].....
Does anybody know if there is an API function that would let me cancel a print job.I already know how to get a handle to a printer and how to enumerate the print jobs using the printer handle.
View 1 Replieshow to make VB handle my associated files.I made a program that opens fine when from the EXE file. But however, when I try to open it from the associated file, it behaves the same way as if opened from the EXE.So, where (in what method?) do I tell VB how to handle those files?
View 8 RepliesI have several installations of my Linq-to-Sql app running in the field. Now I've created a new version, which adds a new column to a certain table. I've added this column in the dbml file. But when updating the installation, I want to preserve the existing database. How to handle this? Linq-to-SQL doesn't seem to like this inconsistency.Is there an easy way to update the existing database using my new dbml file?
View 1 RepliesI am retrieving a database object and trying to set the values of the object's fields to various textboxes in my vb.net page
View 3 Repliesmy computer model has an eject key on top of it (touch sensitive), this handles the CD ejecting. But Windows doesn't native support this button, and I have to use Dell QuickSet to use this button (otherwise it does nothing). I need to hook onto this key and eject the CD Drive when it is pressed (I already have the ejecting and the hooking done). But I have no idea how to detect this key? There is no key in the key list for VB.NET, and I don't know what the eject button sends (Numerical wise) so I can't handle it that way. Does anybody know how to handle the eject key?
View 2 RepliesI am making a vb.net program that calls several other subprograms. None of them effect the other.If there is an error in 1 of them, how do you record the error but continue on to the next subprogram with out stopping everything ?
View 1 RepliesI was working on a project in my VB.NET Express and suddenly my code that was working fine and starting up as normal gave me this error:
{An error occurred creating the form. See Exception.InnerException for details. The error is: Corrupt .resources file. Got an unexpected EndOfStreamException while trying to read the ResourceReader header.}
When I'm trying to run my application, it doesn't open my main form.
Ok, I'm not sure how to explain this, but I'll give it my best shot.I want my console application to be able to do one function I have when you click one option on the windows context menu, and another function when you click another option.
View 2 RepliesOk here's my dilemma. here's this code I have:
If e.KeyCode = Keys.A Then
TextBox1.AppendText("C, ")
PictureBox2.Visible = True
[code].....
I have an an application with a webbrowser. At some point, one of the url's it navigates to opens up as a popup window in internet explorer. I would like to direct the popup window to open up in another webbrowser in my app (WebBrowser2 instead of WebBrowser1 for example) instead. How do i do this?
View 1 Replies