Click here to Skip to main content
16,005,682 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Web Browser Control help. Pin
Luc Pattyn7-Nov-09 12:26
sitebuilderLuc Pattyn7-Nov-09 12:26 
GeneralRe: Web Browser Control help. Pin
thebiostyle7-Nov-09 12:42
thebiostyle7-Nov-09 12:42 
GeneralRe: Web Browser Control help. Pin
thebiostyle7-Nov-09 13:20
thebiostyle7-Nov-09 13:20 
Questionspace in string Pin
ivo756-Nov-09 8:32
ivo756-Nov-09 8:32 
AnswerRe: space in string Pin
Luc Pattyn6-Nov-09 8:59
sitebuilderLuc Pattyn6-Nov-09 8:59 
GeneralRe: space in string Pin
ivo756-Nov-09 10:46
ivo756-Nov-09 10:46 
AnswerRe: space in string Pin
Christian Graus6-Nov-09 11:56
protectorChristian Graus6-Nov-09 11:56 
Questionnini help needed Pin
firefix6-Nov-09 7:16
firefix6-Nov-09 7:16 
If someone has experienced please help with the following:
I need to save path to image using nini (http://nini.sourceforge.net)
So everything works except the path from OpenFileDialog
The code is:

Imports System.Diagnostics
Imports Nini.Config
Imports System.IO

Public Class CompanySetup
    '  Inherits System.Windows.Forms.Form
Public Shared fileBanner As String
Private sourc As IniConfigSource
Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowse.Click

        With bannerFile
            .CheckFileExists = True
            .ShowReadOnly = False
            .Filter = "All Files|*.*|Bitmap Files (*)|*.bmp;*.gif;*.jpg"
            .FilterIndex = 2
            If .ShowDialog = DialogResult.OK Then
                bannerBox.Image = Image.FromFile(.FileName)
                fileBanner = bannerFile.FileName.ToString

            End If
        End With
    End Sub
     
      
sourc.Configs("General").Set("Imgpic", strimg)
     

sourc.Configs("General").Set("CoName", txtCoName.Text)
        sourc.Configs("General").Set("Imgpic", fileBanner)
        sourc.Configs("General").Set("Addr", txtAddr.Text)
        sourc.Configs("General").Set("Phone", txtPhone.Text)
        sourc.Configs("General").Set("Fax", txtFax.Text)
        sourc.Configs("General").Set("Email", txtEmail.Text)
        sourc.Configs("General").Set("Vat", txtVat.Text)
        sourc.Configs("General").Set("Btm1", txtBtm1.Text)
        sourc.Configs("General").Set("Btm2", txtBtm2.Text)
        sourc.Configs("General").Set("Btm3", txtBtm3.Text)
        sourc.Configs("General").Set("Btm4", txtBtm4.Text)


        sourc.Save()

Private Sub CompanySetup_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ' Load the configuration source file
        sourc = New IniConfigSource("dvinv.ini")
        'sourc.CaseSensitive = False

        ' Set the config to the Logging section of the INI file.
        Dim config As IConfig
        config = sourc.Configs("General")

        ' Load up some normal configuration values
        txtCoName.Text = config.Get("CoName")
        fileBanner = config.Get("Imgpic")
        '  MsgBox(config.Get("Imgpic"))

        Try
            bannerBox.Image = Image.FromFile(fileBanner)
        Catch ex As Exception
        End Try
        txtAddr.Text = config.Get("Addr")
        txtPhone.Text = config.Get("Phone")
        txtFax.Text = config.Get("Fax")
        txtEmail.Text = config.Get("Email")
        txtVat.Text = config.Get("Vat")
        txtBtm1.Text = config.Get("Btm1")
        txtBtm2.Text = config.Get("Btm2")
        txtBtm3.Text = config.Get("Btm3")
        txtBtm4.Text = config.Get("Btm4")



    End Sub

No key value Imgpic changes in .ini file!
Please help.
QuestionHow to change return value ? [modified] Pin
wgarnett6-Nov-09 5:37
wgarnett6-Nov-09 5:37 
AnswerRe: How to change return value ? Pin
EliottA6-Nov-09 6:59
EliottA6-Nov-09 6:59 
AnswerRe: How to change return value ? Pin
Christian Graus6-Nov-09 11:54
protectorChristian Graus6-Nov-09 11:54 
QuestionLarge size of Excel files Pin
Saurabh_Damle6-Nov-09 1:59
Saurabh_Damle6-Nov-09 1:59 
AnswerRe: Large size of Excel files Pin
DaveAuld6-Nov-09 10:16
professionalDaveAuld6-Nov-09 10:16 
GeneralRe: Large size of Excel files Pin
Saurabh_Damle6-Nov-09 20:42
Saurabh_Damle6-Nov-09 20:42 
GeneralRe: Large size of Excel files Pin
DaveAuld6-Nov-09 21:17
professionalDaveAuld6-Nov-09 21:17 
QuestionUpdate entries in Database Column. Pin
jeshra2796-Nov-09 0:50
jeshra2796-Nov-09 0:50 
QuestionPublish application in start-->program list Pin
vijay24826-Nov-09 0:08
vijay24826-Nov-09 0:08 
QuestionLabel Array HELP Pin
PAguilar095-Nov-09 18:20
PAguilar095-Nov-09 18:20 
AnswerRe: Label Array HELP Pin
Christian Graus5-Nov-09 18:57
protectorChristian Graus5-Nov-09 18:57 
AnswerRe: Label Array HELP Pin
dan!sh 5-Nov-09 21:35
professional dan!sh 5-Nov-09 21:35 
GeneralRe: Label Array HELP Pin
PAguilar095-Nov-09 22:42
PAguilar095-Nov-09 22:42 
GeneralRe: Label Array HELP Pin
The Man from U.N.C.L.E.5-Nov-09 22:51
The Man from U.N.C.L.E.5-Nov-09 22:51 
GeneralRe: Label Array HELP Pin
PAguilar095-Nov-09 23:03
PAguilar095-Nov-09 23:03 
GeneralRe: Label Array HELP Pin
Sigurd Johansen6-Nov-09 10:18
Sigurd Johansen6-Nov-09 10:18 
GeneralRe: Label Array HELP Pin
PAguilar096-Nov-09 19:23
PAguilar096-Nov-09 19:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.