Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
O

oakleaf

@oakleaf
About
Posts
42
Topics
19
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • JSON in a console application
    O oakleaf

    I have a windows form application (VB) that can serialize and deserialize some JSON for me, however, I cannot seem to serialize and deserialize JSON in a console application (the ultimate goal here). I am starting to get the feeling that I am attempting to do something that is not even possible, even though I have seen a couple examples of this being done in C++.

    Dim url As String = ""
    Dim myHttpWebRequest As HttpWebRequest = CType(WebRequest.Create(url), HttpWebRequest)
    myHttpWebRequest.Credentials = New NetworkCredential("user", "pass")
    myHttpWebRequest.PreAuthenticate = True
    Dim myHttpWebResponse As HttpWebResponse = CType(myHttpWebRequest.GetResponse(), HttpWebResponse)
    Dim receiveStream As Stream = myHttpWebResponse.GetResponseStream()
    Dim reader4 As New StreamReader(receiveStream)
    Dim response3FromServer As String = reader4.ReadToEnd()
    Console.WriteLine("responseFromServer: " & response3FromServer)

    The above will retrieve the JSON and display it, no problem.

    Dim deserializedOrder2 As New CardItems()
    Dim ms2 As New MemoryStream(Encoding.UTF8.GetBytes(response3FromServer))
    Dim ser2 As New DataContractJsonSerializer(deserializedOrder2.GetType())
    deserializedOrder2 = TryCast(ser2.ReadObject(ms2), CardItems)
    CardID = deserializedOrder2.CardID
    Console.WriteLine(CardID)

    Now obviously I have CardItems all set up with members, CardID being one of them, but I can't seem to get the value. Is there a problem with the above?

    Visual Basic c++ json help question

  • Windows service Error
    O oakleaf

    Your reply made the error make sense. :thumbsup: Esp. the "InitializeComponent" piece. I wanted to use a windows service so that I could use the timer to schedule it rather than schedule a task to run as a user. I have moved the project to a windows form, and will use a service to run the program instead. Most likely what I want to do would not work as a service anyways...
    My objective: Multiple transactions against a remote server, sending and receiving JSON, deserializing the responses and then taking the appropriate actions on a MS SQL server db.

    Visual Basic visual-studio help question

  • Windows service Error
    O oakleaf

    I have created a windows service (in VB, using VS 2010) and once I have it installed and attempt to run it, I receive the following error in the event viewer:

    Service cannot be started. System.InvalidOperationException: Cannot change service name when the service is running.
    at System.ServiceProcess.ServiceBase.set_ServiceName(String value)
    at PostProcessing.PostProcessing.InitializeComponent()
    at PostProcessing.PostProcessing.OnStart(String[] args)
    at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)

    I have a feeling that this has to do with the installer, but not sure what to check. All of the names are "PostProcessing". Anybody have an idea for me? Thanks.

    Visual Basic visual-studio help question

  • trouble with string in app.config
    O oakleaf

    For those who may run into similar problem: So I kept digging...er googling and finally came up with the correct search term... "illegal characters in app.config" Solution: The replacement for the illegal character "&" is "& a m p ;" (remove the surrounding quotes and spaces! Ignore HTML and PRE did not work for display purposes). This works fine. Thanks to anyone who may have been trying to find an answer to my question. -- modified at 11:46 Monday 21st August, 2006

    Visual Basic help

  • trouble with string in app.config
    O oakleaf

    I am trying to specify a company name in a var within the app.config file. Problem: The company name is "Fetch & Co. LCC" The program balks when it hits the "&" symbol in the string. Remove the "&" ---- works fine. This has got to be something simple... Additional info: If I try to put the string in the assembly info file (as ProgramTitle) The title will be blank. Thanks for any help.

    Visual Basic help

  • How to get information about/from controls in another process
    O oakleaf

    I have an application that will find a program based on processid. I can then get the Main Window Title, Main Module Name, Handle BUT I need to figure out how to then get information from that program's controls. I am also having a hard time figuring out how to get the above information from the application's child windows. (Enum, I know, but a good starting point anyone?) Vb.net 2003 Thanks in advance for any pointers.

    Visual Basic csharp tutorial question

  • All I want to do is open a .pdf in Acrobat
    O oakleaf

    I was basically trying anything at that point. Yes, VB.net 2003... The code I was using was something that I had jotted down somewhere...sometime ago.. So I used the code you provided with one exception. Dim newProcess As New Process newProcess.StartInfo.FileName = Application.StartupPath & "\help_files\Potato_Traceability_User_Guide.pdf" newProcess.StartInfo.UseShellExecute = True newProcess.Start() The Path.Combine(Application.StartupPath, "\help_files\Potato_Traceability_User_Guide.pdf") did not seem to work. It only sent "\help_files\Potato_Traceability_User_Guide.pdf" ? Thanks.

    Visual Basic linux debugging help question

  • All I want to do is open a .pdf in Acrobat
    O oakleaf

    So I tried this: Dim objWSH As Object : objWSH = CreateObject("WScript.Shell") Call objWSH.Run("'" & Application.StartupPath & "\help_files\Potato_Traceability_User_Guide.pdf" & "'") 'objWSH = Nothing Which works fine while in debug mode. But when the install is compiled and then installed to c:\Program Files\asdf The file cannot be found. (but other files in the same directory of RTF format can be loaded into a rich text box control?) So I tried: Dim objWSH As Object : objWSH = CreateObject("WScript.Shell") mypath = Application.StartupPath.Replace("\", "\\") mypath = mypath.Replace(" ", "%20") Call objWSH.Run("'" & mypath & "\\help_files\\Potato_Traceability_User_Guide.pdf" & "'") 'objWSH = Nothing and a couple of other variations.... what should have taken 10 minutes, I am now 2 hours on...can someone help or let me know what it is that I am doing wrong?

    Visual Basic linux debugging help question

  • Error icon in datagrid
    O oakleaf

    Writing my own update statements for a fairly complex datagrid. When running my insert/update/del statements I get "parameter ?_5 has no default value." in the error icon on the left next to each modifed record, and no updates are performed. Trying to understand what field ?_5 is in the whole scheme of things. Field in dataset, field in SQL statement, what.. and how to make the error become more understandable...like change it to display the field name? thanks for any help or ideas..

    Visual Basic help database tutorial question announcement

  • DataGrid Height .
    O oakleaf

    Try: textboxname.TextBox.Multiline = True textboxname.TextBox.ScrollBars = ScrollBars.Vertical could also use: ScrollBars.Horizontal ScrollBars.Both ScrollBars.None hope that helps..

    Visual Basic css

  • Datagrid problems - deleting rows
    O oakleaf

    I think that the datagrid in question is a bit too complex for this to work. I tried what you had posted in the DataGrid1_KeyDown event... If e.KeyCode = Keys.Delete Then..... but I still immediately receive: ************** Exception Text ************** System.NullReferenceException: Object reference not set to an instance of an object. at System.Windows.Forms.DataGrid.ResetSelection() at System.Windows.Forms.DataGrid.ResetUIState() at System.Windows.Forms.DataGrid.SetDataGridRows(DataGridRow[] newRows, Int32 newRowsLength) at System.Windows.Forms.DataGrid.DeleteDataGridRows(Int32 deletedRows) at System.Windows.Forms.DataGrid.DeleteRows(DataGridRow[] localGridRows) at System.Windows.Forms.DataGrid.ProcessGridKey(KeyEventArgs ke) at System.Windows.Forms.DataGrid.ProcessDialogKey(Keys keyData) at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData) at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData) at System.Windows.Forms.Control.PreProcessMessage(Message& msg) at System.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMsoComponent.FPreTranslateMessage(MSG& msg)

    Visual Basic help com question learning

  • MDAC Version
    O oakleaf

    More information can be found here: http://support.microsoft.com/default.aspx?scid=kb;en-us;301202[^] "Although not the most reliable way to check the MDAC version", I use a launch condition and install it if the version is below 2.7

    Visual Basic help question announcement career

  • Datagrid problems - deleting rows
    O oakleaf

    I have been having this issue for some time now. Some may remember seeing my posts over the course of the last few months. Issue: Everything seems to work with the exception of deleting rows from the datagrid. Err - You can delete rows if you start from the topmost record and work your way down. ?? I have posted the full code for one of the offending forms here Ideas/advice needed and appreciated. If more information is needed, please let me know.

    Visual Basic help com question learning

  • datagrid that does not display null for blank data...how it is possible
    O oakleaf

    Me.columnname.NullText = ""

    Visual Basic css database help

  • Multiple comboboxes in datagrid....
    O oakleaf

    I have two combo boxes in my datagrid. I need to be able to select a value in one (databound) combobox and have the values in the other (on the same row) change (run a new SQL statement based on the value selected and repopulate). Have you (the reader) done this before and/or can you point me to a resource? Let me know if I am too cryptic..... Thanks in advance.

    Visual Basic database question learning

  • screensaver application
    O oakleaf

    Nope, nail on the head, er... Another case of the developer making things difficult for themselves. Thanks.

    Visual Basic tutorial csharp help question

  • screensaver application
    O oakleaf

    So I have meself a simple little screen saver app that I made with a lot of help from articles here on codeproject and elsewhere (thanks goes out to all who post such articles and tutorials). I would like to enable this app to create custom screen savers from settings the user specifies. I need to figure out how I can have my application make a copy of itsself (or even another existing copy) with the user settings. But doesn't it need to be compiled? If someone could point me to a tutorial that might explain how to go about doing such a thing that would be great. Currently using VB .net 2003 -- modified at 14:04 Thursday 8th September, 2005

    Visual Basic tutorial csharp help question

  • Debug.WriteLine
    O oakleaf

    Suddenly my project does not send my debugging output to the output window... Yes, I am running it in debug mode. Is there any particular settings I need to check? and how do I get to them? Thanks in advance for any help.

    Visual Basic question debugging help

  • MouseHover Event
    O oakleaf

    Have you tried the tooltip control?

    Visual Basic tutorial question

  • capturing and handling keyboard input
    O oakleaf

    Yeah, was just reading that on MSDN.... Gina isn't an option.... now have to modify the registry... Ugh HKCU\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ System\DisableTaskMgr = dword:1 thanks

    Visual Basic help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups