If NewEntryName.Text = "" And OpenFileDialog1.FileName = Nothing Then MsgBox("Please choose a name for your game.", vbExclamation) MsgBox("Please find your game.", vbExclamation) Else Button1.Text = NewEntryName.Text
After developing using the Excel Interop with .Net for a while, i have become increasingly annoyed with the how many "odd things" happen - such as this question i posted earlier.
Im 16 and have been working with Vb for a few months when i have time. I am trying to make a text box that when the user of the program types into it what they have typed will be sent to my email with a push of a button...Im having alot of trouble because i dont know how to do this.
I want to make it so when I scroll down on one listbox view, it will do the same on the other one. How do I do that? I have one listbox that lists usernames, and the other one that does the message... so we don't have to worry about one having a longer height than the other one.
OK, Well I'm creating a "Card" creating app. The app will let you type in the name you want in the name field and then select a picture. But the problem is, is the saving. I want the card to be transparent like the original. The original is just a blank card. And theres a picturebox on the form that shows the original transparent image, and then a label over the name tag part of the original transparent image, and then another picturebox over the original pictures box for the picture, everything works for designing and it looks great after your done designing the card. But saving will not be transparent and it will not blend with the background.
How do I add onto the image and still keep the transparency of the original and then save it?
This is my code:
Label1.SendToBack() PictureBox2.SendToBack() Dim Card As New Bitmap(Panel1.Width, Panel1.Height)
I have a rather odd thing happening with an Excel WorkSheet that I am creating through .Net.I load up an existing workbook
Dim _xlApp As New Excel.Application Dim _xlWorkbook As Excel.WokBook = _xlApp.Workbooks.Open(_templateFileName)
set it to be visible before populating it (for debugging purposes)
_xlApp.Visible = True
I then go on to populate the existing template.
Private Sub GenerateOceanFreightGrid() Dim columnCount As Integer = 4 ' _standardColumnCount Dim columnInsertPosition As Integer = 5
[code]....
When i set a breakpoint on the "Private Sub Gen.." line, and step through the code line by line, it inserts a new column for each variable declared, so in this case it will insert two columns before it even hits the "If MyBooleanValue()..." line (I can watch it actually happen due to the Excel app being visible). However, if i dont set a breakpoint and just let the code run straight through this doesnt happen.There is no multi threading happening or anything else that i suspect would have any impact on the code.
I am wondering if it is possible to drag and drop a control, lets call it a button, and drag it from a FlowLayoutPanel and drop it in a diff FlowLayoutPanel?
I have a class that wraps up a few methods (e.g. OpenPort, SendMessage etc.). Some of the methods accept a number of parameters and return a value (e.g. SendMessage accepts port and a string that is the message to be sent and returns true or false depending on whether the mesage was sent successfully or not). I create an instance of my class when my form loads and I call the various methods throughout the lifetime of the app.In my SendMessage method there is actually a few steps that involves a delay as I send commands to an instrument and wait for a response. I'm using the AutoResetEvent class to synchronize things. Whilst this works ok I've noted that the UI is unresponsive during the wait period.
Public Class MyClass Private _receiveNow As AutoResetEvent Public Function OpenPort(ByVal portName As String, _
at my collage we have to rename all buttons and labels to represent the type of thing the button, label or text box etc do For instance if I had an OK button I would change the Text and (Name) of the button in the Properties section from Button1 to BtnOk, if it is a Label I have to change it to LblOk etc I was wondering if there is a way to change the default (Name) Button1 to (Name) Btn1 and so on so that I only have to click on the 1 and type my description, rather than having to type the abbreviation for the type of object every-time also ?
vbc.exe has something called /optimize switch right. If I enable that what are the optimizations the compiler can do for me? The MSDN documentation just curtly says 'does various compiler optimizations'. Where can I find the complete quantified view of the different optimizations that actually goes into.Here is the thing I am pursuing this route. One of the code blocks in a module I am leading has a lot of delimited array manipulations. I believe this is going to be a heck costly in terms of string memory handling. I am looking to see if I can retire them by way of simple properties or methods so that the compiler can internally do something like our c++ inline functions making a best win-win offer in terms of both memory and processing time. I admit when the compiler translates them as inline function, the JITed code might be big in size right?
i have form1 - Form2 and Form3 Form1 appears and i have to pick a color and click the button to go to the form2, then in form2 it shows the color and in form3 too..which is the best way to do this ? My.forms.Form2.SomeCodeHere or just Form2.SomeCodeHere
I am trying to get things to print on multiple pages. I am just printing the same thing over and over with slightly different values. At the moment the print out is only one page and it overwrites it's self. How do I make a page break?
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage ' Set up earnings statement information and send to graphics page object.
Is this possible? It gives me an error, and I had previously thought it could work for folders and drives and stuff like that as well. Icon.ExtractAssociatedIcon("C:") did not work when I tried it, and threw an error. How can I get the associated icon from EVERYTHING? This is vb.net
I was wondering how I can make this happen. I am making a app that basicallysite faster. I am using Visual Studio 2010 Ultimate. I have a text box that has some of these fields on the side:
I'm trying to find out how i can go to a webpage and input text into a textbox. Like ill have a web browser, 2 buttons and a textbox. When you open the program and type a string into the textbox it loads the website, then when you press the button in types it into the search. When you press the second button it searches.
If TextBox1.Text = ("weburl") Then WebBrowser1.Document.GetElementById("price_category").SetAttribute("value", "4") End If If TextBox1.Text = ("weburl") Then WebBrowser1.Document.GetElementById("fullprice_quantity").SetAttribute("value", "4") End If If WebBrowser1.DocumentText.Contains("Add to shopping list") Then WebBrowser1.Document.GetElementById("add_to_list").InvokeMember("click") End If.
I want them to go in order. But what it is doing at the moment is going to the third if statement first.
I have an interface IMyInterface and this interface implements a method MyMethod.I have an object MyObjectBase. This object contains a(the same) method MyMethod.1) If now I do MyObject Inherits MyObjectBase Implements IMyInterface need I to redefine? (shadow, override) MyMethod in the MyObject class?
I'm trying to get help or idea how to get certain things out of text file. I don't know even if it's possible, but I hope so.[code]I need to get that number what is after /kick "nr". Also I need to get last /kick "nr".
I'm making a program in Visual Basic 2008, and I want the user to be able to save certain things on the form. Would it be a good idea to save the saves items to a .txt file in C:WINDOWS? The reason I'm wanting to do this is so the user won't easily find the file and it is easily done.
im making a game in vb 2010. but im new to 2010 so i dont know how it works (because i used 6.0 before).I have a form, where the graphics should be drawn on. "frmMainGame".I have a module where I want to put all Graphic things in.so I have in my module Graphics.vb [code].....
now I have a button what calls the sub "Call DrawPlayerCoordinates()".but now it gives an error because it don't know where to draw the string. So how do the code above know it should draw it on "frmMainGame" and not in a module what isn't possible?
I often face the following problem : when I have a form with lots of controls on it (100 , 200 etc) and I change the name of a control , the IDE goes slow for a few seconds . This is very annoying when I have to change the name to a lot of controls . I believe this is happening because the IDE checks the forms , the code etc to see if there any problem after (re)naming the controls . Of course this is welcome because it prevents a lot of problems , but at the same time it creates some serious problems as well . Thus , I wonder , is there any way I could prevent the IDE from checking all those things in order not to reduce it's speed ? Of course I am talking temporarily . I believe that what I gain by letting it check after every name-changing , I also gain it if I only let it check once (at the end of the name-changing process) .