Answer Questions
katgreen XML- file & network- access
I have a program witch reads a xml file. When i run it in c: it works but when I try it from network it can not read the xml file. I got an IO Permission exception. What do I have to configure Thanks! Is that right public bool load( string fileName) { this .fileName = fileName; try { FileIOPermission fp = new FileIOPermission ( FileIOPermissionAccess .Read, this .fileName); PermissionSet ps = new PermissionSet ( PermissionState .None); ps.AddPermission(fp); XmlTextReader reader = new XmlTextReader ( this .fileName); reader.XmlResolver = new XmlSecureResolver ( new XmlUrlResolver (), ps); xmlDoc.Load(reader) ...Show All
Nathan Baulch how to use Object as any component
Hi, I'm developing skin application for smart device by using visual studio 2003 and 2005. i need your help. my problem is how to use Object or Control as any component like PictureBox, ListView, ListBox... For example: I have one form which contains two Pictureboxes, one ListView, one ListBox, and one Panel. i have to set location and size of all components in many time when the program runs. Now i am setting Bounds for all components in every events. it is too increase code length. I think i am going to create one function which is used to set location, size, and Image (if it is picturebox control). In that function has one argument. what my question is which type i have to declare for that argument ...Show All
sham_huss command buttons
Hello! How can I assing icons to command buttons Set the Image property. Hi, here is an example from the msdn with example-code: http://msdn2.microsoft.com/en-us/library/system.windows.forms.buttonbase.image.aspx ralph ...Show All
RJMPhD Fax services in Windows
Did .net enable to send fax through the Microsoft Fax services How is the concept look like,basically i would like to create a program which retrieve a data from SQL SERVER and fax it to the receiver. I created a project by copying above source code. However, my VB reports that system didn't install FAXCOMEXLIb, anyone can advise me how to install FAXCOMEXLIb Thanks & Best Regards, Haihong kangkang, The following Microsoft Visual Basic code example sends a fax. Note that if you were to convert this Visual Basic example to Visual Basic Scripting Edition (VBScript), you would have to use an enumeration constant instead of the value fptHigh. Private Sub Form_Lo ...Show All
Adcoe How to get DataGridView into Database
How I get this into Database Thank you. Public Class Form1 Dim PocetRiadkov As Integer Private Sub Table1BindingNavigatorSaveItem_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Me .Validate() Me .Table1BindingSource.EndEdit() Me .Table1TableAdapter.Update( Me .Database1DataSet.Table1) End Sub Private Sub Form1_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load 'TODO: This line of code loads data into the 'Database1DataSet.Table1' table. You can move, or remove it, as needed. Me .Table1TableAdapter.Fill( Me .Database1DataSet.Table1) End Sub Private Sub Button1_Click( ByVal sender As System.Obj ...Show All
x0ras I will change my BD
Hello. I'd want to know suggestions on how can I define my classes knowing to I will change my DB For examle: for a method that opens a connection, now It returns an oledbconnection, but in the future Il will returns a sqlconnection. I could send a parameter to the class and it will open the good connection, for example I wouldn't change all class in the future. Thanks... Have a look at the provider factory: http://msdn2.microsoft.com/en-us/library/t9f29wbk.aspx -- SvenC ...Show All
Scionwest Odd behavior on enter key twice
Converting a program from VS03 to VS05 professional using VB... If you put your cursor after a line of existing code, and hit enter twice, it should just add a blank line and then you paste and then you paste new code and you get a line between your pasted new code and the existing code. In VS05, however, it does that and often highlights the last word of existing code so when you paste, you have messed up your code. This is an odd behavior that did not exist in VS03 and it very annoying. The behavior does not existing in any other program (like Word), so it is a VS05 specific issue. Is it a known bug or does anyone have any ideas Thanks! Bob Hi, Bob, I just gave this a try and I'm not able to reproduce the pr ...Show All
WRBehning I'm making a conversion program...
For those of you who know me, I've finally settled on an idea for a program. It converts (for starters) from anything that ends with meters (you know, centimeter, millimeter, kilometer) into anything else that ends with the word meters. You get the idea. I'm useing combo boxes, and I need to assign values to the names in the box, so they can be multiplied. Like, the selection (this is exactly what it looks like) "centimeter(cm)" needs to be assigned the value 0.01. How do I do that, and make it so that when one thing from one box is selected, and one thing from another box is selected, and a button is clicked, they get multiplied together Thanks. What you can do is set the entry in the combo b ...Show All
mihe Cell Change Event of Datagrid View
Hi, All I am developing a database application in VB.Net, I am using datagrid view control for accepting user input and showing various tax calculation at the bottom of the windows form, datagridview control provide afteredit event of the cell which is working fine when user leave the cell after editing the content, however it does not shows the calculation while user types the amount (like textchange event of text box), If any body have any solution, please let me know. Thanks Atanu hi, It does not solve my problem, your code is ok but, it calculate the result after you leave the current cell, i want to display the result when user type the value like keypress, keydown or keyup event without leaving the current cell ...Show All
Uwe82 VB code to convert xml file to .txt
Hi, I have a xml file that I generated with a SQL query. I need the info from that xml file converted to a .txt file. I can not export the sql information to plain text, because I need to modify the info into a certain way as well. The first thing I need to be able to do is to convert xml to .text and then I will get to converting in some format. Can someone please help me or point me to documentation or books to read. I really need to do this and would greatly appretiate the help. Thanks! That was very helpful! For the first time I am finding documents on this issue and I have been sitting with this for a while. The user still does not make anything out of the file when they open it in Notepad and that is why I ...Show All
SolarWind Memory Problem
Hello everybody, I have a problem that my program takes a lot of memory. I have been told if i use "Dim ..... as string" it will take much more memory than what i need, and i can make a range for "String", but how note: In VB 6, its was like this:(if i only need 30 characters) Dim sth as string * 30 I saw this page, i was really amazed, i didn't expect that. Well Thx Anyway The memory-usage shown for .Net apps in TaskManager is basically wrong - just check this page: http://www.itwriting.com/dotnetmem.php TaskManager can show 20MB being used, but the real amount can be as low as 2MB. String won't allocate more (or much more) than what is currently needed.It is lik ...Show All
elvis8900 Scroll Bar
Hello Everbody this is the first question to me here and i hope i will get an answer for that i am a new comer to Visual basic and i have the visual studio 2005 and my question is: if i have a notpad file (text file) and i waana creat a scroll bar (like the one we see on CNN moving from left to right or even from right to left) and i need to load the contents from that text file how can i achieve that. thanks a lot for your help Add a new usercontrol to your project. Paste this code: Public Class TextScroller Private mFilename As String Private mPadding As String Private mText As String = "Please set the text or filename property" Private mTextPos As Integer Private WithEvents mTimer As N ...Show All
Jazz4sale Cannot Save Registry Key
I wrote this function: Public Function PS_save(ByVal setting As String, ByVal value As String) As Object Dim key As Microsoft.Win32.RegistryKey Try key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Internet Explorer\\PageSetup") key.SetValue(setting, value) Return Nothing Catch MsgBox("An internal error has occured.", MsgBoxStyle.Critical, "Error") Return Nothing End Try End Function I am attempting to chage the IE Page Setup settings, which are registry based. My functions to see if a key exists and to read a key work fine but this won't. I get the message box error. Not sure whats causing the error its based off of my read class ...Show All
GinaK How do I access right-click context menu on Explorer (programmatically) ?
Hello, I would like to know how can I add an entry on the context menu of Explorer, when right-clicking a file or a folder I don't really know the exact name of this menu but, It is the menu where you can find the following options : Open Explore Send to Copy Cut Properties ... I would like to create a software that integrates into this menu and would like to know how can I retrieve the array containing the selected folders and/ or files Thank you ! Hi, I know that it is accessible through [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell] and that the parameters (the selected folders/files) are returned as %1. But how to programmatically access this %1 I su ...Show All
Mateusz Rajca Display a tooltip when the mouse hover a specific word/phrase
Hello, I have a label with a lot of text. I want to do, that when I hover specific words/phrases it will display a tooltip with a pre-defined text. For example, if the label is written "Hello, welcome to my program. It will help you a lot.", then I want to do that if the user mousehover the word welcome it will display a tooltip with text of "Hi User", and if the mouse will hover the phrase "help you", it will display a tooltip with text of "In a lot of stuff". Thanks, Ofir. You didn't understand... I want the ToolTip to show Only if the mouse is over a specific word/phrase, not on every mousehover. Tha ...Show All
