Search results

  1. D

    Answered Single instance - duplicated

    I wrote app1 that had 'make single instance application' checked in the app properties. All good there. I then needed app2, which is an admin version of app1, and the code wasn't going to be substantially different to app1 so i took a copy of it and did the renaming things (the folder...
  2. D

    Office object library versions

    This has bugged me for a while and i'm hoping for some 'train of thought' advice to aid my learning. On my laptop i have office 2010. I write an app that pulls in data from an excel spreadsheet. That app references 'Microsoft Excel 14.0 Object library' and 'Microsoft Office 14.0 Object...
  3. D

    SQLite app distribution

    I recently developed an app to be used by many people in my workplace. It utilises a SQLite db that is used to store/retrieve data. All is good on that side until i distributed to a select few to start testing. For most it ran fine, but for a couple the app loaded normally but absolutely no...
  4. D

    Designer in high res.

    If i have my laptop in full res (2560x1440) then the graphical side of the VS designer is unusable: I have been changing my res to 1366x768, then rebooting, then starting work again. Is there a trick i am missing that would allow me to work in full res and thus avoid this annoyance?
  5. D

    MS Access images to WinForms application

    I've been searching for a few days now and getting nowhere - or going round in circles! Same question asked in a lot of places but no real answer that nails it (that i can see) I have an MS Access 2010 database and one of its fields is set as OLE object and has pictures in it. How can I convert...
  6. D

    Datagridview - which image?

    I have a datagridview and one of the columns is of type image. In this image cell on each row there is an image taken from the resources file which, depending on the situation, could be my.resources.image1, my.resources.image2, my.resources.image3 and so on. If, sometime later in my code, i...
  7. D

    Datagrid image

    I know this sounds like a daft question - maybe i have brain freeze at the mo? I'm adding an image to a cell in a datagrid thus: frmMain.dgAlist(8, frmMain.dgAlist.currentrow.index).value = My.Resources.R1 and thats fine. But what i want now is to get the info of which image is in that...
  8. D

    Wake up failing

    Hoping someone can point me in the right direction. I wrote an app in Community 2015 .net 4.5, more as a learning curve than anything else. Its an MP3 player that uses WMP to do the work. All is ok except the following situation: 1. my app is playing music 2. after few mins screen saver comes...
  9. D

    Treeview - restore path

    I have a treeview that acts as a file explorer, i.e. populates with the contents of a drive. I save the last used path in an .ini file and would like to restore this when the program is next run but can't figure out how to get the treeview to go to the stored path. e.g. C:\ --Folder1 --Folder2...
  10. D

    Process Start - Excel

    I'm using the following code to open XML files in Excel, which works fine: Dim startInfo As New ProcessStartInfo startInfo.FileName = "Excel.exe" startInfo.WorkingDirectory = c_OUCPath startInfo.Arguments = Me.lbxConfSent.SelectedItem Try Process.Start(startInfo)...
  11. D

    RichTextBox highlight text

    To highlight text at the moment i'm using: Me.txtNote.SelectionBackColor = Me.dlgColor.Color where dlgColor is a colour selector. Seems to work ok, but how do i de-highlight, like you can do in, say, MS Word? I could set the highlight to the paper colour but that isn't right because if the...
  12. D

    Dir listing

    I have come across an issue that was previously (embarrassingly) unthought of by me, and am not having much luck searching for a suitable solution. I can use ArrDirs = Directory.GetDirectories(Pth, "*", 1) to get an array of directories for a given path. I foolishly thought this would return...
  13. D

    Process.Start locks dir from delete?

    I wrote a little app that launches some programs or dirs, essentially using: Try System.Diagnostics.Process.Start(Pth) Catch ... End Try Works fine, but noticed that if, for example, i launch a dir using the app, then close it, then go to delete it i can't. It says its locked and the...
  14. D

    Disposing of form

    I've been reading recently about passing vars between forms and all is going well with me designing my own msgbox as a trial. Problem i have is the timing of the msgbox form disposal. I'm using the following to hold the msgbox value... Public Property MsgResult() As Object Get...
  15. D

    Form icon

    I was looking how to flash a form to alert the user when i came across the following code. Thought it could look good with a little modification. However, when i run the code in the IDE it works perfectly (alternating the icon in the taskbar), but running from the compiled .exe then the icon...
  16. D

    Line Feeds

    I have what is hopefully a simple, newbie issue to resolve. I have some code that opens a new email in the default client, if it exists. I don't need to actually send the email (hence no addressing) just open a new message and populate subject and body. The code below works fine in every way...
  17. D

    Simulate up arrow in multi-line textbox

    I am writing a little 'macro' functionality into my multi-line textbox. All is ok except i don't know how to move the cursor up, or down, lines to simulate pressing the keyboard arrow keys (left and right are no problem). Obviously lines can wrap so using substring may be out? Can someone please...
  18. D

    Printing Tab Character

    My search skills must be going naff as I can't find a suitable answer to this issue anywhere! Plenty of replies to 'replace the tab with spaces' but that does not align the text correctly. It can't be that hard, can it? :eek2: My text prints correctly except the tab chars are missing. So...
  19. D

    'IN' command?

    My train of thought has gone dead! I'm looking for an equivalent 'IN' command, like: S=2 if S isIn(1,2,3,4,5) then = true to replace if S=1 then true elseif S=2 then true... I know i could use case statement to achieve it but this is a one liner so wondering if there is such a function? I...
  20. D

    Disabling keystroke

    If i want to disable a keystroke I can use: If e.KeyCode = xx Then e.Handled = True in the keydown event, but what if the key i want to disable needs a shift press first, such as the pipe char (124)? How do i handle that?
Top Bottom