Why am I getting "End of statement expected"? Hello,
Why am I getting "End of statement expected"
Thanks for the help.
Ken
Private Sub txtReadRegValue_TextChanged( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtReadRegValue.TextChanged
if txtreadregvalue.Text not txtreadregvalue.Text then
cmdOpenPort.PerformClick()
End If
End Sub Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
Read data from serial port .. ? hello guys ..
i need to communicate two PC¡¯s using serial communication ( connect via serial null modem cable ).. i managed to write and sent data to serial port but how to write loops to read data from serial port i'm using visual c++ 2005 express editon and my OS is windows XP.. below is my code .. can anyone help me
#pragma endregion
public: System::Void button1_Click(System: bject^ sender, System::EventArgs^ e) {
String^ msg; msg = textBox2->Text; textBox1->Text = textBox1->Text + "PC 1 : " + msg + Char(13) + Char(10);
serialport1->Write( msg + Char(13) + Char(10)); textBox2->Text = ""; }
private: System::Void Form1_Load(System: bject^ sender, System::EventArgs^ e) { serialport1->Open(); }
private: System::Void Form1_FormClosed(System: bject^ sender, System::Windows::Forms::FormClosedEventArgs^ e) { serialport1->Close(); }
private: System::Void serialport1_DataReceived(System: bject^ sender, System::IO: orts: erialDataReceivedEventArgs^ e) {
int reg1; String^ reg2;
do { reg1 = serialport1->ReadChar(); reg2 = reg2 + Char(reg1); } while (reg1 != 13);
textBox1->Text = textBox1->Text + "PC 2 : " + reg2 + Char(13) + Char(10);
} Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
combobox dropped down how can i display a combobox that has been placed in a tabcontrol page 2 to display all items when i click the tab2 button on the tabcontrol. kind of like looking at a listbox Thanks Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
Overwrite Picture Question Hi everyone. I was playing around with this, and I'm not sure of the best approach. I have a pictureBox that I load with a local file (C:\, etc...). It isn't an embedded resource or anything. I would like to have the ability to overwrite the image and repopulate the textBox, but it says that the file is in use. I thought that the pictureBox would just load the image into the pictureBox and close the connection to the file, allowing it to be overwritten, but apparently that is not the case. In order to do what I want, do I need to load the image into memory or something first and then populate the pictureBox with the image in memory Or is there an easier way to do this This is the code that I am using: this.pictureBox1.Image = Image.FromFile(Environment.CurrentDirectory + @"/Pics/" + this.textBox3.Text + ".jpg"); Any help is greatly appreciated. Thanks Again, Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
Video file attributes? Is there a method for extracting the native aspect(width/height) ratio value from a video file (.swf, .avi, .mov)
General file info doesn't include this attribute. Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
How to Print an RTF Document. This may have been answered previously (if so I apologise for the redundancy). But how do I go about making a button that, when pressed make the RTF box in my application print out. please be detailed or link me to somewhere that is...as I'm still not that great at VB.net Thanks in advance to anyone who answers my call. Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
Compiling Maya Plugins error Hi,
I've installed VC++ express and Platform SDK for XP SP2.
I'm trying to compile a helloWorld plugin by using MayaPlugInWizard (that already seems to be set fine), but it give me an error:
1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
1>Compiling...
1>cl : Command line warning D9025 : overriding '/EHs' with '/EHa'
1>helloWorldCmd.cpp
1>c:\documents and settings\administrator\my documents\maya plugins\helloworld\helloworld\helloworldcmd.cpp : error C4335: Mac file format detected: please convert the source file to either DOS or UNIX format
1>c:\documents and settings\administrator\my documents\maya plugins\helloworld\helloworld\helloworldcmd.cpp(1) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
1>c:\program files\autodesk\maya8.5\include\maya\mtypes.h(138) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
1>Build log was saved at "file://c:\Documents and Settings\Administrator\My Documents\Maya Plugins\HelloWorld\HelloWorld\Debug\BuildLog.htm"
1>HelloWorld - 2 error(s), 2 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Does any body faced this problem.. Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
unable to find .netframework 2.0.50727 on windows update ATI grahics card update driver requires .netframework v 2.0.50727 Windows update only downloaded version 1.1. I built this computer and installed windows xp pro. Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
Getting rid of the annoying strip on MenuStrips and ContextMenuStrips Is there a way to get rid of the annoying blue strip things illustraited in the picture below:
http://s152.photobucket.com/albums/s194/paoloTheCool/ action=view¤t=Tyronxx.jpg Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
MOUSE OVER help! Hello, I was wondering how to do a mouseover in ASP.NET (I prefer client side coding for this). For example: If I want a simple image to change to another when the mouse is hovering/moved over the image. This image should also be a hyperlink. I assuming client side coding will be the easist... Any help will be greatly appreciated. Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
saving background image Ok, I figured out how to change my background image that i wanted from a button, but now i need to know how to save the background I chose so the next time i run the program the same background i chose will be there. Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
Linking VB and C# solutions together...how?? Hi,
I'd like to link two solutions together, one coded in VB, while the other coded in C#, but they're not yet published programs; they're still being coded. How do I do this Thanks Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
Populate combo box based on choice of another combo box Hi all, This is probably an easy question for you all, but being the neophyte that I am, I'm having some problems getting this to work. The end result of what I'm trying to do is populate a 2nd combo box based upon the choice of the 1st combo box. Both combo boxes grab data from two different tables. So here's where I'm at. When the form loads, I've populated the first combo box with the data I want from the correct table in the DB. Where I'm getting stuck is populating the 2nd combo box based upon the choice of the 1st combo box. Here it is in a little more detail. I've got a Customer and a Show table. The Customer data is loaded into the 1st combo box when the form loads from a view I've created in SQLE 2k5. This is, of course, the data source. The display member and value member is the company name and ID, respectively. Now, I've written a stored procedure to get the Show info based upon the ID of the Company. So my problem here is actually two-fold I suppose. 1) How do I go about hooking all the adapters and binding sources for these tables and combo boxes to 'talk' to each other 2) How do I pass the Company ID parameter into those bindings so the stored procedure can execute properly in that 2nd combo box Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
Attributes of Any file What is the best method to get and set the attributes of any file(.exe, .txt, .mdb and etc Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
dOWNLOAD MANAGER IN vb!!!!!!!!!!!!!!! i need alot of help with this!!!!! I WANT TO MAKE A DOWNLOAD MANAGER FOR MY WEB BROWSER AND I ALL READY MADE TO POST ABOUT IT. mY PROBLEM IS that my progressbar doesn't move while downloading. i tryed the webclient Download Progress changed event but still no dice. Please help!!!
Code Block
Public Class Downloader
Delegate Sub ChangeTextsSafe( ByVal length As Long , ByVal position As Integer , ByVal percent As Integer , ByVal speed As Double )
Private Sub Download_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load
SaveFileDialog1.Filter = "Files(*.*)|*.*"
SaveFileDialog1.FilterIndex = 1
SaveFileDialog1.RestoreDirectory = True
If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
ProgressBar1.Increment( "30" )
WebClient1.DownloadFile(TextBox1.Text, SaveFileDialog1.FileName)
If My .Computer.FileSystem.FileExists(SaveFileDialog1.FileName) = True Then
ProgressBar1.Increment( "70" )
End If
TextBox1.Enabled = False
End If
End Sub
Private Sub Timer1_Tick( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
End Sub
Private Sub WebClient1_DownloadFileCompleted( ByVal sender As Object , ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles WebClient1.DownloadFileCompleted
ProgressBar1.Value = "100"
End Sub
Private Sub WebClient1_DownloadProgressChanged( ByVal sender As Object , ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles WebClient1.DownloadProgressChanged
ProgressBar1.Maximum = e.ProgressPercentage
ProgressBar1.Step = e.ProgressPercentage
ProgressBar1.Value = e.BytesReceived
End Sub
End Class Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
Need some help to copy data from one table to another table in acces database Hello,
I'm using a database from a Point of Sale program. I'm missing some simple tools in this program so i want to make a program whitch will fulfill my needs.
I'm having a problem how to copy certain data from a table to another table. The database is a access database. This is what i want to do:
- I have a button to push to copy the data from a record in a grid to another table
- there are only 4 fields i need to copy to the other table
- i'm using studio 2005 express
Can someone give me a hint or some code
Thanx
Michel Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
counting words in text box. I'm trying to count instances of words in a text box and display the count number and word in a listbox. Here's what I have now:
Private Sub SortUp()
Dim source As String = txtData.Text
Dim WordList As String = ""
Dim result As New System.Text.StringBuilder
Dim parser As New Regex( "\b[a-z]+\b" )
source = source.ToLower
txtWordList.Text = ""
Dim sourceMatches As MatchCollection = parser.Matches(source)
Dim counter As Integer
'Dim finder As Integer = sourceMatches(counter).Value.ToString()
For counter = 0 To sourceMatches.Count - 1
result.Append(sourceMatches(counter).Value.ToString()).Append( " " )
Next counter
WordList = WordList & result.ToString.Trim
Dim S() As String = Split(WordList, " " )
Array.Sort(S)
Dim Word As String
Dim Idx As Single = 0
Dim Qty As Single = 1
Dim tempWord As String = ""
txtWordList.ForeColor = Color.Black
'Dim WordCountArray As String
lstData.Items.Clear()
Dim Qty_tmp As Single = 1
For Each Word In S
If tempWord = Word Then
Qty += 1
lstData.Items.Add(Idx & " (" & Qty & ") " & Word)
'Debug.Print(Idx & " (" & Qty & ") " & Word)
Else
Idx += 1
'check for last instance
Qty = 1
'Debug.Print(Idx & " (" & Qty & ") " & Word)
lstData.Items.Add(Idx & " (" & Qty & ") " & Word)
tempWord = Word
End If
Next
End Sub
I tried a test file like this: "now hear this now this deep now" and got these results:
1 (1) deep
2 (1) hear
3 (1) now
3 (2) now
3 (3) now
4 (1) this
4 (2) this
The result I want is:
1 (1) deep
2 (1) hear
3 (3) now
4 (2) this
Can anyone suggest how to do this Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
Slide-Down MENU - What controls? Hopefully someone can point me in the right direction:
I would like to create a 'slide-down menu' like the left bar under WINDOWS EXPLORER in XP. I looked around in the web but since I do not even know how it is called and what controls are used I have no idea what I have to look for ...
Can anybody help Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
Visual Studio - Cant create a new Project Hi,
I really need your help...
I have to program something very important but my Visual Studio is
just not working...
When i want to create a new Project, it doesn't matter what I choose
a bugged window comes up whose buttons don't work...
I just can close it by pressing the [X] in the top right corner,
but a new Project is not being created:
http://img245.imageshack.us/img245/5325/err0rve1.jpg I already reinstalled and redownloaded the Application, I manually cleaned the folder after deinstalling etc etc... I really don't know what to do now.
Thank you for your help! Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
String.IsNullOrEmpty suggestion I don't know if this is the right forum to make a suggestion could you direct me to where i should post this message Loads of times i find myself Trimming a string to remove white spaces to check if it is empty or not with String.IsNullOrEmpty, is it possible to have a second method implementation that will trim the string for us e.g. String.IsNullOrEmpty(string value, bool trim) Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
Wait for a web page to load using web browser control? I'm trying to write some code to load a webpage, wait for it to load, and then run some code. Here's the code I'm using:
WebBrowser1.Navigate( "http://ccs.shop.wii.com/ccs/download/00010001" & ee & ff & gg & hh & cc & dd & aa & bb & "/FFFD0001" ) 'Load the webpage
Do Until WebBrowser1.Document.Title = "Apache Tomcat/4.1 - Error report" Or WebBrowser1.Document.Images.Count = 1 : Loop 'Wait until either an image loads (Images.Count = 1) or until the error page loads (Title = "Apache ...")
However, it just hangs when it gets to the loop. If I remove the loop the page loads fine. Any clue on what the problem is Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
Publish Prerequisite Problem My application says it needs the following prerequisites for publishing: .NET Framework 2.0 Windows Installer 3.1 SQL Server 2005 Express edition Microsoft.JSharp.2.0 All fine but the JSharp (Warning triangle on icon and message "prerequisite could not be found for bootstrapping") I've searched the web high and low and can't find any info on this. Any feedback would be welcome. Regards Jan Konijnenberg jankonijnenberg@blueyonder.co.uk Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
How to open an external folder? What code should I write so that I can open a folder by clicking button1 Thanks.
I want to make it open a folder in C:/Documents and Settings/.../My Pictures/PMIC with the name of Label1.Text E.g., if Label1.Text = "moi" then it should open C:/Documents and Settings/.../My Pictures/PMIC/moi. Thanks so much. Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
Data Grid View I was wondering how could I make a row in a data grid from just except integers When I add data to the Data Grid with the program it puts in integers in one of the colunms and when a user puts numbers in that same column it comes up as a string I think and gives an error when trying to sort by that column. Is there a way to make the data inputed by the user compatible with the data inputed by the program (if the program puts strings in the column it does not sort properly. It will place 12 after 15 as lowest, only looking at the 1 and then looking at the second number. Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
Drawing a line one pixel at a time I want to draw a line, but I want to draw it a little at a time. Just like the DrawLine finction, but one dot at a time. How do I do this Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
Events for ComboBox thats inside a dataGridView Hi How can i access the events of a comboBox that is inside of a cell (on dataGridView) For example i have a dataGridView with one Row. the first cell have a comboBox with "name", "date", and "age". i need to make an event when i click "name" on the comboBox, inside the second cell of the same row, will appear "paul". thanks!! Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
NewWindow Event of WebBrowser Control... Hi,
i am using vb.net 2005
In the WebBrowser , how do i get the url to which it is navigating to when the NewWindow event is fired.
In VB6 it was available for the Webbrowser control as bstrurl in the NewWindow3 event.
I referred to the post at http://forums.microsoft.com/msdn/showpost.aspx postid=7228&siteid=1
But that code is too long
I just want the Url , that's it..
Pleaes help me out... Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
sort ASC an .mdb file from visual basic hello, i made a change to an access file this way... Dim myData As New DataSet() 'Dim mySelectQuery As String = _ '"SELECT * FROM D WHERE postoffice like ',MIHAI%'" Dim myConnection As New OleDbConnection( _ "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=c:\mihai.mdb") Dim strSelect As String = "update D set postoffice=RIGHT(postoffice,9) where postoffice not like ',MIHAI%'" Dim dsCmd As New OleDbDataAdapter(strSelect, myConnection) dsCmd.Fill(myData) myConnection.Close() the execution is ok,but i also want that the file c:\mihai.mdb to be sorted ASC at postoffice column.... thank you. Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
MSDN article: Managing a Music Collection Using Visual Basic Express and SQL Server Express Anyone tried to run the ManageMusicSample project included the MSDN article "Managing a Music Collection Using Visual Basic Express and SQL Server Express" written by Brian A. Randell
First a comment:
At: http://msdn2.microsoft.com/en-us/library/ms345151.aspx you find the article I refer to BUT without the VB project to download. Why Don't know.
At: http://www.microsoft.com/spanish/msdn/articulos/archivo/100904/voices/08ColMusicVBEx.asp
you find the same article translated to spanish AND with the ManageMusicSample project attached for download.
MSDN mistake
Anyway, when I open the project in VB.net 2005 Express I get about 46 errors and 5 warnings (maybe because it was written in Visual Basic 2005 Express Edition, Beta 1)
I tried to resolve the errors but because I'am a complete newbie it only leads to more errors!
Please can anyone debug the project because it's really very interesting to me.
See you. Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
html using the RTB Im trying to create web pages using the RTB but evry time i save the contents of the RTB as a html file it shows this code ({\rtf1\ansi\ansicpg1252\deff0\deflang2057{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}} \viewkind4\uc1\pard\f0\fs17 \par \par \par \par \par \par \par \par \par \par \par \par }) does eny one know how to correct this Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions
How to Get a Certificate? I am tying to make these examples;
http://msdn.microsoft.com/msdnmag/issues/07/03/NETSecurity/default.aspx loc=&fig=true#fig3
http://msdn.microsoft.com/msdnmag/issues/07/03/NETSecurity/default.aspx loc=&fig=true#fig5
But i couldn't run my application Errors are :
Error 1 The name 'X509Certificate2UI' does not exist in the current context D:\Test\WindowsApplication1\WindowsApplication1\Form1.cs 65 21 WindowsApplication1
Error 2 The name 'X509SelectionFlag' does not exist in the current context D:\Test\WindowsApplication1\WindowsApplication1\Form1.cs 67 36 WindowsApplication1
Error 3 The name 'X509Certificate2UI' does not exist in the current context D:\Test\WindowsApplication1\WindowsApplication1\Form1.cs 70 17 WindowsApplication1 Error 4 A namespace does not directly contain members such as fields or methods D:\Test\WindowsApplication1\WindowsApplication1\Form1.cs 8 53 WindowsApplication1 Tag: Visual C++ Express Edition Support for MFC Visual Studio Express Editions